<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>float</title>

    <style>
        *{
            padding: 0;
            margin: 0;
        }

        body{
            height: 200vh;
        }

        /* float */
        .div1{
            width: 100px;
            height: 100px;
            background-color: aqua;
            float: right;
        }

        .div2{
            width: 50%;
            height: 200px;
            background-color: red;
            float: right;
        }

        .div3{
            width: 50%;
            height: 300px;
            background-color: yellow;
            float: right;
            /* margin-left: -400px; */
        }

        .top{
            position: fixed;
            width: 100%;
            height: 100px;
            background-color: black;
            float: right;
        }

        .bottom{
            width: 100%;
            height: 400px;
            background-color: aquamarine;
            /* float: right; */
        }

        .clear{
            clear: both;
        }

        /* .container{
            content: '';
            clear: both;
            display: block;
        } */

        .clearFix::after{
            content: '';
            clear: both;
            display: block;
        }

        .inline-box{
            /* display: inline-block; */
            width: 100px;
            height: 100px;
            float: left;
        }

        .red{
            background-color: red;
            height: 200px;
        }

        .blue{
            background-color: blue;
        }
    </style>
</head>
<body>

    <!-- <div class="top"></div>
    <div class="container clearFix">
        <div class="div3"></div>
        <div class="div2"></div>
        <div class="div1"></div>
    </div> -->
    <!-- <div class="clear"></div> -->
    <!-- <div class="bottom"></div> -->

    <!-- <div style="font-size: 0px;"> -->
        <div class="inline-box red"></div>
        <div class="inline-box blue"></div>
    <!-- </div> -->
</body>
</html>